<template>
  <div class="app-container">
    <el-row type="flex">
      <el-input
        v-model="input"
        style="width: 300px"
        placeholder="请输入搜索内容"
        class="input-with-select"
        @input="handlerInput"
      >
        <el-button slot="append" icon="el-icon-search"/>
      </el-input>
    </el-row>

    <el-table
      style="margin-top: 10px"
      :data="showList"
      element-loading-text="Loading"
      border
      fit
      highlight-current-row
    >
      <el-table-column align="center" label="房源名称">
        <template slot-scope="scope">
          <span>{{ scope.row[0] }}</span>
        </template>
      </el-table-column>
      <el-table-column label="用户名" align="center">
        <template slot-scope="scope">
          <span>{{ scope.row[1] }}</span>
        </template>
      </el-table-column>
      <el-table-column label="联系电话" align="center">
        <template slot-scope="scope">
          <span>{{ scope.row[2] }}</span>
        </template>
      </el-table-column>
      <el-table-column label="月租金" align="center">
        <template slot-scope="scope">
          {{ scope.row[3] }}
        </template>
      </el-table-column>
      <el-table-column class-name="status-col" label="操作" align="center">
        <template slot-scope="scope">
          <el-button size="small" type="primary" @click="goToDetail(scope.row)">审核</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="400"
    >
    </el-pagination>
  </div>
</template>

<script>
import { parseTime } from '@/utils'

export default {
  filters: {
    parseTime
  },
  data() {
    return {
      currentPage: 1,
      input: '',
      list: [],
      showList: [
        ['整租·空港家园A组团5单元12-9','小唐', '123456789', '高级VIP', '2022-04-18', '2022-04-29']
      ]
    }
  },

  created() {
  },
  methods: {
    handlerInput() {

    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    }
  }
}
</script>
